package com.PDP.util.reports;

import jakarta.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.Cascade;
import org.hibernate.annotations.CascadeType;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Entity
@Table
public class ReportInfo {
    @Id
    @GeneratedValue
    Long id;

    public ReportInfo(String name, String address, List<ReportProperties> reportProperties) {
        this.name = name;
        this.address = address;
        this.reportProperties = reportProperties;
    }

    String name;
    String address;
    @OneToMany
    @Cascade({CascadeType.ALL})
    List<ReportProperties> reportProperties;

}
